package ckw.communication;

import ckw.managers.CommunicationManager;
import core.communication.message.Message;
import core.communication.message.NodeStateMessage;

public class MessageReceiver extends core.communication.MessageReceiver<CommunicationManager> {

	public MessageReceiver(String name, CommunicationManager communicationManager) {
		super(name, communicationManager);
	}

	@Override
	protected void handleConfigurationMessage(Message message) {
	}
	
	@Override
	protected void handleNodeStateMessage(Message message) {
		super.handleNodeStateMessage(message);
		communicationManager.updateNodeState(((NodeStateMessage)message).getLocatorURI(), ((NodeStateMessage)message).getState());
	}
}
